<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>收费信息管理</title>
	<meta name="decorator" content="ani"/>
	<script type="text/javascript">

		$(document).ready(function() {

	        $('#begindate').datetimepicker({
				 format: "YYYY-MM-DD HH:mm:ss"
		    });
	        $('#enddate').datetimepicker({
				 format: "YYYY-MM-DD HH:mm:ss"
		    });
	        $('#paydate').datetimepicker({
				 format: "YYYY-MM-DD HH:mm:ss"
		    });
		});
		function save() {
            var isValidate = jp.validateForm('#inputForm');//校验表单
            if(!isValidate){
                return false;
			}else{
                jp.loading();
                jp.post("${ctx}/property/chargeinfo/propertyChargeinfo/save",$('#inputForm').serialize(),function(data){
                    if(data.success){
                        jp.getParent().refresh();
                        var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                        parent.layer.close(dialogIndex);
                        jp.success(data.msg)

                    }else{
                        jp.error(data.msg);
                    }
                })
			}

        }
	</script>
</head>
<body class="bg-white">
		<form:form id="inputForm" modelAttribute="propertyChargeinfo" class="form-horizontal">
		<form:hidden path="id"/>	
		<table class="table table-bordered">
		   <tbody>
				<tr>
					<td class="width-15 active"><label class="pull-right">备注信息：</label></td>
					<td class="width-35">
						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">房屋信息：</label></td>
					<td class="width-35">
						<sys:gridselect url="${ctx}/property/houseinfo/propertyHouseinfo/data" id="houseid" name="houseid.id" value="${propertyChargeinfo.houseid.id}" labelName="houseid.room" labelValue="${propertyChargeinfo.houseid.room}"
							 title="选择房屋信息" cssClass="form-control " fieldLabels="房间号|业主姓名" fieldKeys="room|houseowner.name" searchLabels="房间号|业主姓名" searchKeys="room|houseowner.name" ></sys:gridselect>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">收费项目：</label></td>
					<td class="width-35">
						<form:select path="chargeitem" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('chargeitem')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
					<td class="width-15 active"><label class="pull-right">收费标准：</label></td>
					<td class="width-35">
						<form:select path="chargestandard" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('chargestandard')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">计费开始日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='begindate'>
							<input type='text'  name="begindate" class="form-control "  value="<fmt:formatDate value="${propertyChargeinfo.begindate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</td>
					<td class="width-15 active"><label class="pull-right">计费结束日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='enddate'>
							<input type='text'  name="enddate" class="form-control "  value="<fmt:formatDate value="${propertyChargeinfo.enddate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">付费日期：</label></td>
					<td class="width-35">
						<div class='input-group form_datetime' id='paydate'>
							<input type='text'  name="paydate" class="form-control "  value="<fmt:formatDate value="${propertyChargeinfo.paydate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</td>
					<td class="width-15 active"><label class="pull-right">付费方式：</label></td>
					<td class="width-35">
						<form:select path="paytype" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('paytype')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">应收金额：</label></td>
					<td class="width-35">
						<form:input path="mustpay" htmlEscape="false"    class="form-control  number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">实收金额：</label></td>
					<td class="width-35">
						<form:input path="alreadypay" htmlEscape="false"    class="form-control  number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">缴费状态：</label></td>
					<td class="width-35">
						<form:select path="paystatus" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('paystatus')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
					<td class="width-15 active"><label class="pull-right">车位信息：</label></td>
					<td class="width-35">
						<sys:gridselect url="${ctx}/property/carinfo/propertyCarinfo/data" id="carinfo" name="carinfo.id" value="${propertyChargeinfo.carinfo.id}" labelName="carinfo.carno" labelValue="${propertyChargeinfo.carinfo.carno}"
							 title="选择车位信息" cssClass="form-control " fieldLabels="车牌号|业主姓名" fieldKeys="carno|houseowner.name" searchLabels="车牌号|业主姓名" searchKeys="carno|houseowner.name" ></sys:gridselect>
					</td>
				</tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>